<template>
  <div class="cellWrapper" @click="normalClick">
    <p>{{title}}</p>
    <span>{{subhead}}</span>
    <i>
      <van-icon name="arrow" class="arrow" />
    </i>
  </div>
</template>

<script>
export default {
  props: ["title", "subhead"],
  methods: {
    normalClick() {
      // 这里我知道被点击了, 但是不知道该干啥
      // 需要通知调用我的父组件进行后续操作
      this.$emit("normalClick");
    },
  },
};
</script>

<style lang="less" scoped>
.cellWrapper {
  display: flex;
  padding: 16/360 * 100vw;
  border-bottom: 1px solid #ccc;
  padding-left: 0/360 * 100vw;
  font-size: 14/360 * 100vw;
  margin-left: 20/360 * 100vw;
  p {
    flex: 1;
  }
  span {
    color: #adadad;
  }
  .arrow {
    color: #adadad;
    padding-top: 3/360 * 100vw;
    padding-left: 3/360 * 100vw;
  }
}
</style>